SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.[DnnProduct_GetFolderPermissionsByPortal]
	@PortalId int
AS
BEGIN
	IF @PortalId IS NOT NULL BEGIN
		SELECT *
		FROM dbo.DnnProduct_vw_FolderPermissions
		WHERE PortalID = @PortalID
	END
	ELSE BEGIN
		SELECT *
		FROM dbo.DnnProduct_vw_FolderPermissions
		WHERE PortalID IS NULL
	END
END
GO
